package cn.t.converter.device;

import cn.t.core.converter.CoreDTOConverter;
import cn.t.dto.device.CargowaySkuDTO;
import cn.t.dto.order.android.PickupDetailDTO;
import cn.t.model.device.CargowayDO;
import cn.t.model.device.CargowaySkuDO;
import cn.t.model.order.OrderDetailDO;
import cn.t.vo.andriod.AndroidCargowayVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * 货道商品表(CargowaySku)dto转domain
 *
 * @author t
 * @since 2024-05-24 10:19:33
 */
@Mapper(componentModel = "spring")
public interface CargowaySkuDTOConverter extends CoreDTOConverter<CargowaySkuDTO, CargowaySkuDO> {

    @Mapping(target = "cargowayId", source = "cargowayDO.id")
    @Mapping(target = "cargowayNo", source = "cargowayDO.cargowayNo")
    @Mapping(target = "lineNum", source = "cargowayDO.lineNum")
    @Mapping(target = "columnNum", source = "cargowayDO.columnNum")
    @Mapping(target = "skuCode", source = "cargowaySkuDO.skuCode")
    @Mapping(target = "skuName", source = "cargowaySkuDO.skuName")
    @Mapping(target = "skuImg", source = "cargowaySkuDO.skuImg")
    AndroidCargowayVO.CargowayVO carDo2CarVo(CargowayDO cargowayDO, CargowaySkuDO cargowaySkuDO);
    PickupDetailDTO.DetailVO do2PickupDetail(CargowaySkuDTO cargowaySkuDTO);
    PickupDetailDTO.DetailVO do2PickupDetail(OrderDetailDO orderDetailDO);
    List<CargowaySkuDO> dtoList2DoList(List<CargowaySkuDTO> cargowaySkuDTOList);
}

